xen.git
20 years agoFix the build.
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:53:39 +0000 (15:53 +0100)]
Fix the build.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdated default config options for VMX test domains in xm-test, got rid of
stekloff@elm3b216.beaverton.ibm.com [Tue, 10 Jan 2006 14:44:36 +0000 (14:44 +0000)]
Updated default config options for VMX test domains in xm-test, got rid of
nics option and added acpi and apic.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoChanged ifconfig loopback to have 127.0.0.1, so ping will work.
stekloff@elm3b216.beaverton.ibm.com [Tue, 10 Jan 2006 14:44:31 +0000 (14:44 +0000)]
Changed ifconfig loopback to have 127.0.0.1, so ping will work.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:38:22 +0000 (14:38 +0000)]
Merged.

20 years agoProactively check for NULL strings passed into xc_linux_build. Either DTRT
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:37:25 +0000 (14:37 +0000)]
Proactively check for NULL strings passed into xc_linux_build.  Either DTRT
or return error if detected.  A NULL cmdline, for example, would currently
generate a segfault.

Signed-off-by: Ben Thomas <bjthomas3@gmail.com>
20 years agoAdd VMX guest quick start into Xen 3.0 user manual.
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:33:28 +0000 (15:33 +0100)]
Add VMX guest quick start into Xen 3.0 user manual.

Signed-off-by: Yongkang You <yongkang.you@intel.com>
Signed-off-by: Alan C. Oehler <alan@xensource.com>
Signed-off-by: John L Villalovos <john.l.villalovos@intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
20 years agoMade network-bridge script work on ALL systems missing ifup/down.
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:33:00 +0000 (14:33 +0000)]
Made network-bridge script work on ALL systems missing ifup/down.
This is done by defining ifup/down both to 'false' when they're
missing; then instead of attempting to parse the IP params from
the kernel command line, we get them from 'ip' instead.  So this
works even with (for example) ip=dhcp on the kernel command line.

Also made a few minor syntax changes (in particular, replaced "=="
with "=", and ">&foo" with ">foo 2>foo") so this works with more
limited shells.

Signed-off-by: Ben Thomas <bjthomas3@gmail.com>
20 years agoProactively check for NULL strings passed into xc_linx_build. Either do
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:28:41 +0000 (15:28 +0100)]
Proactively check for NULL strings passed into xc_linx_build.  Either do
the right thing or return error if detected.  A NULL cmdline, for example,
would currently generate a segfault.

Signed-off-by: Ben Thomas <bjthomas3@gmail.com>
20 years agoAdd dummy 'all' target to guest-headers Makefile.
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:26:57 +0000 (15:26 +0100)]
Add dummy 'all' target to guest-headers Makefile.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:24:12 +0000 (14:24 +0000)]
Merged.

20 years agoExtend the xc_linux_save interface to take a callback function for handling the
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:23:56 +0000 (14:23 +0000)]
Extend the xc_linux_save interface to take a callback function for handling the
suspend, and push the printf("suspend") out of xc_linux_save and into xc_save.
This means that xc_linux_save can be used without the xc_save wrapper if
desired.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTiny bootstrap cleanup.
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 18:46:46 +0000 (19:46 +0100)]
Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoGeneral start-of-day cleanups, resulting in the
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 18:44:30 +0000 (19:44 +0100)]
General start-of-day cleanups, resulting in the
x86/32 map_domain_page() mapcache now being per-domain
rather than global.

Other cleanups include removal of static definition of
CPU0's idle domain. Instead a single, multi-cpu, idle domain
is dynamically created early during bootstrap.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 14:43:46 +0000 (14:43 +0000)]
Merged.

20 years agofree trans if allocated, if dev_request_and_reply fail.
vhanquez@kneesa.uk.xensource.com [Mon, 9 Jan 2006 13:11:55 +0000 (13:11 +0000)]
free trans if allocated, if dev_request_and_reply fail.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFail early without calling dev_request_and_reply if memory cannot be allocated.
vhanquez@kneesa.uk.xensource.com [Mon, 9 Jan 2006 11:31:49 +0000 (11:31 +0000)]
Fail early without calling dev_request_and_reply if memory cannot be allocated.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix context_switch(). It is necessary to set_current() and
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 11:25:05 +0000 (12:25 +0100)]
Fix context_switch(). It is necessary to set_current() and
then check curr_vcpu all with interrupts disabled. This in
turn requires us to hoist the heck of next's vcpu_dirty_cpumask
as sending the flush IPI needs us to have interrupts enabled to
avoid deadlock.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAs hotplug events are asynchronous by its nature, the remove event seems
root@kct [Mon, 9 Jan 2006 11:24:02 +0000 (11:24 +0000)]
As hotplug events are asynchronous by its nature, the remove event seems
to be missed in some environments. This patch adds a sleep (with the same
amount of time of the one after xm block-detach) between attach and
detach operations, giving attach enough time to complete, making test 06
suceed.

Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 11:22:17 +0000 (11:22 +0000)]
Merged.

20 years agoAdded missing munmap for live_p2m_frame_list_list.
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 11:19:55 +0000 (11:19 +0000)]
Added missing munmap for live_p2m_frame_list_list.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix the error recovery at the undo_out label in __gnttab_map_grant_ref to
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 11:17:55 +0000 (11:17 +0000)]
Fix the error recovery at the undo_out label in __gnttab_map_grant_ref to
not unlock the spinlock twice (which causes a BUG).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAllow HYPERVISOR_VIRT_START/END public definitions to be
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 10:31:19 +0000 (11:31 +0100)]
Allow HYPERVISOR_VIRT_START/END public definitions to be
used in assembly files. Check that the public and private
definitions of these constants match up at run time.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd cpumask_scnprintf() and cpulist_scnprintf(). This also
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 17:17:13 +0000 (18:17 +0100)]
Add cpumask_scnprintf() and cpulist_scnprintf(). This also
adds the bitmap_scnprintf functions and scnprintf itself.

Add dirty cpu and cpu affinity info to 'q'-key debug output.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove netif_be_dbg debug-key handler from netback by default.
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 17:16:10 +0000 (18:16 +0100)]
Remove netif_be_dbg debug-key handler from netback by default.
It generally just messes up the formatting of 'q' key output.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoHandle migration of x86 VCPUs between physical CPUs.
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 16:52:43 +0000 (17:52 +0100)]
Handle migration of x86 VCPUs between physical CPUs.
If required, context_switch() must pull state off of
old CPU.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoReduce locked critical region in __enter_scheduler(),
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 15:53:25 +0000 (16:53 +0100)]
Reduce locked critical region in __enter_scheduler(),
changing the context switch interface yet again.

domain_runnable() renamed to vcpu_runnable().

Fix stupid bug resulting in bogus value for
vcpu_dirty_cpumask, which caused vcpu_sync_execstate() to
fail sometimes.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoseparate installation of headers from the linux tree into a new guest-header
vhanquez@kneesa.uk.xensource.com [Sat, 7 Jan 2006 01:31:04 +0000 (01:31 +0000)]
separate installation of headers from the linux tree into a new guest-header
directory under tools.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agotest return value of kmalloc to prevent crash is the allocation fail.
vhanquez@kneesa.uk.xensource.com [Fri, 6 Jan 2006 22:07:04 +0000 (22:07 +0000)]
test return value of kmalloc to prevent crash is the allocation fail.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoGet rid of the err variable by directly returning error values.
vhanquez@kneesa.uk.xensource.com [Fri, 6 Jan 2006 22:03:58 +0000 (22:03 +0000)]
Get rid of the err variable by directly returning error values.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoChange the context-switch interface. Get rid of
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 17:14:29 +0000 (18:14 +0100)]
Change the context-switch interface. Get rid of
context_switch_finalise(). Instead provide a back-call
context_switch_done() for situations where arch-specific
context_switch() function does not return to the caller,
or needs to do some parts of state restoration with
interrupts enabled.

Get rid of ugly hack in arch/ia64.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRename per-domain cpumask to more descriptive domain_dirty_cpumask.
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 16:45:31 +0000 (17:45 +0100)]
Rename per-domain cpumask to more descriptive domain_dirty_cpumask.
Add a new per-vcpu dirty cpumask (vcpu_dirty_cpumask), useful for
state flushing and selective tlb flushing.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up domain shutdown and modification of vcpu
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 15:47:25 +0000 (16:47 +0100)]
Clean up domain shutdown and modification of vcpu
processor affinity.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAlways EXPORT_SYMBOL pm_power_off now that pm_power_off is always defined.
cl349@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 15:24:46 +0000 (16:24 +0100)]
Always EXPORT_SYMBOL pm_power_off now that pm_power_off is always defined.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoMove definition of pm_power_off to a more sensible location.
cl349@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 11:59:55 +0000 (12:59 +0100)]
Move definition of pm_power_off to a more sensible location.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix a couple of bogus dom0_op names:
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 11:53:19 +0000 (12:53 +0100)]
Fix a couple of bogus dom0_op names:
  setdomaininfo -> setvcpucontext
  pincpudomain  -> setvcpuaffinity

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up xen-internal representation of per-vcpu
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 11:25:47 +0000 (12:25 +0100)]
Clean up xen-internal representation of per-vcpu
physical cpu affinity. Rename idle_task variables and
macros to idle_domain.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix up x86 emulator header docs and ensure callers use
kaf24@firebug.cl.cam.ac.uk [Thu, 5 Jan 2006 11:19:12 +0000 (12:19 +0100)]
Fix up x86 emulator header docs and ensure callers use
the X86EMUL_MODE enumeration.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe dom0_ops implementation wasn't matching the interface definition,
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 17:51:38 +0000 (18:51 +0100)]
The dom0_ops implementation wasn't matching the interface definition,
leading to ill messages when X starts up (and potentially to other
problems). The attached patch fixes that. However, it also points out
that there is a potential disagreement between the dom0_ops interface
and the internal MTRR interface - the former expects an unsigned
register number from the domain, the latter wants a signed one and does
a lookup when it's negative. I would think that the lookup code should
just be ripped out of xen/arch/x86/mtrr/main.c.

Signed-off-by: Jan Beulich <JBeulich@novell.com>
20 years agoFixes to mtrr interface code in linux guest.
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 17:47:11 +0000 (18:47 +0100)]
Fixes to mtrr interface code in linux guest.

Signed-off-by: Jan Beulich <JBeulich@novell.com>
20 years agoAdd IO-APIC interrupt debugging to 'i' debug key.
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 17:37:24 +0000 (18:37 +0100)]
Add IO-APIC interrupt debugging to 'i' debug key.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix split of duties between close_netdev() and
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 13:45:52 +0000 (14:45 +0100)]
Fix split of duties between close_netdev() and
netif_disconnect_backend() in netif driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd pending status to irq debugkey dump.
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 11:37:27 +0000 (12:37 +0100)]
Add pending status to irq debugkey dump.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd dubug key for dumping guest-bound physical interrupts
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 11:18:02 +0000 (12:18 +0100)]
Add dubug key for dumping guest-bound physical interrupts
and their current status.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis patch adds TPM_Seal support to the VTSP. On measured platforms
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 10:37:41 +0000 (11:37 +0100)]
This patch adds TPM_Seal support to the VTSP. On measured platforms
this can be use to better protect secrets in the VTPM System

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 18:06:14 +0000 (19:06 +0100)]
merge

20 years agoMarge with xen-ia64-unstable.hg
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 18:03:56 +0000 (19:03 +0100)]
Marge with xen-ia64-unstable.hg

20 years agoconvert latest old initializer to C99 initializer
vhanquez@kneesa.uk.xensource.com [Tue, 3 Jan 2006 16:57:41 +0000 (16:57 +0000)]
convert latest old initializer to C99 initializer

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix comment describing return value -- xs_rm returns false if the path does not
emellor@leeni.uk.xensource.com [Tue, 3 Jan 2006 16:29:42 +0000 (16:29 +0000)]
Fix comment describing return value -- xs_rm returns false if the path does not
exist, not true.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove "Died" support from the hotplug monitoring. This error code was used
emellor@leeni.uk.xensource.com [Tue, 3 Jan 2006 16:28:00 +0000 (16:28 +0000)]
Remove "Died" support from the hotplug monitoring.  This error code was used
when hotplugStatusCallback raised VmError, but this can no longer happen.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse xenctrl.h, not xc_private.h.
emellor@leeni.uk.xensource.com [Tue, 3 Jan 2006 16:26:24 +0000 (16:26 +0000)]
Use xenctrl.h, not xc_private.h.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdapt xen-ia64 to changes in xen-unstable
djm@kirby.fc.hp.com [Tue, 3 Jan 2006 16:20:05 +0000 (10:20 -0600)]
Adapt xen-ia64 to changes in xen-unstable

20 years agoMerge
djm@kirby.fc.hp.com [Tue, 3 Jan 2006 16:19:20 +0000 (10:19 -0600)]
Merge

20 years agoSmall bug fixes
djm@kirby.fc.hp.com [Tue, 3 Jan 2006 14:59:00 +0000 (08:59 -0600)]
Small bug fixes

20 years agoRemove 03_network_attach_detach_multiple_pos.test from xfail list
emellor@leeni.uk.xensource.com [Tue, 3 Jan 2006 14:51:33 +0000 (14:51 +0000)]
Remove 03_network_attach_detach_multiple_pos.test from xfail list

Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
20 years agoVcpu-list's error message shows an unnecessary header.
emellor@leeni.uk.xensource.com [Tue, 3 Jan 2006 14:08:32 +0000 (14:08 +0000)]
Vcpu-list's error message shows an unnecessary header.

Signed-off-by: Yoshinori Katase <y_katase@soft.fujitsu.com>
20 years agoThese xm info, top, dmesg and log requre no parameter.
emellor@leeni.uk.xensource.com [Tue, 3 Jan 2006 14:07:43 +0000 (14:07 +0000)]
These xm info, top, dmesg and log requre no parameter.
But log's error message differs from other 3 command's error messages,
when parameter is given.

# xm log 1
Error: 'xm log' requires 0 argument.

   log                              Print the xend log

Other 3 commands ignore parameter.
I think it might be better symmetricalize.

Signed-off-by: Yoshinori Katase <y_katase@soft.fujitsu.com>
20 years agoMove public hvm interfaces into xen/include/public/hvm.
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 13:58:34 +0000 (14:58 +0100)]
Move public hvm interfaces into xen/include/public/hvm.
Add new header hvm_info_table.h for defining location and
contents of acpi-style hvm_info_table. Remove duplicate
definition in vmxassist/acpi_madt.c.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 13:36:56 +0000 (14:36 +0100)]
merge

20 years agoRename VMX option name lapic to apic, and pass it to xen by
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 13:35:45 +0000 (14:35 +0100)]
Rename VMX option name lapic to apic, and pass it to xen by
hvm_info_table.  Previous we pass it to xen by guest vcpu context ECX
register, now we unify to use hvm_info_table.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agomerge
vhanquez@kneesa.uk.xensource.com [Tue, 3 Jan 2006 13:04:59 +0000 (13:04 +0000)]
merge

20 years agomixup during reorganization. when SIF_INITDOMAIN it should kcons_write_dom0
vhanquez@kneesa.uk.xensource.com [Tue, 3 Jan 2006 13:03:35 +0000 (13:03 +0000)]
mixup during reorganization. when SIF_INITDOMAIN it should kcons_write_dom0

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix VMX disk config string parse (allow leading whitespace).
kaf24@firebug.cl.cam.ac.uk [Mon, 2 Jan 2006 10:35:29 +0000 (11:35 +0100)]
Fix VMX disk config string parse (allow leading whitespace).

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoProvide an option to disable ACPI from the VMX config file.
kaf24@firebug.cl.cam.ac.uk [Sun, 1 Jan 2006 10:29:17 +0000 (11:29 +0100)]
Provide an option to disable ACPI from the VMX config file.
By default ACPI is disabled.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
20 years agofix possible memory leak if one of the kmalloc fail.
vhanquez@kneesa.uk.xensource.com [Sat, 31 Dec 2005 20:17:45 +0000 (20:17 +0000)]
fix possible memory leak if one of the kmalloc fail.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoremove one pointless macro and make code paths explicit.
vhanquez@kneesa.uk.xensource.com [Sat, 31 Dec 2005 19:35:11 +0000 (19:35 +0000)]
remove one pointless macro and make code paths explicit.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoreorganize code to avoid duplication
vhanquez@kneesa.uk.xensource.com [Sat, 31 Dec 2005 15:58:44 +0000 (15:58 +0000)]
reorganize code to avoid duplication

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoConvert old initializer to C99 initializer.
vhanquez@kneesa.uk.xensource.com [Sat, 31 Dec 2005 14:20:01 +0000 (14:20 +0000)]
Convert old initializer to C99 initializer.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agodirectly return -ENOMEM instead of jumping to a return -ENOMEM label
vhanquez@kneesa.uk.xensource.com [Sat, 31 Dec 2005 14:17:10 +0000 (14:17 +0000)]
directly return -ENOMEM instead of jumping to a return -ENOMEM label

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agomove error handling out of line to avoid duplicated code.
vhanquez@kneesa.uk.xensource.com [Sat, 31 Dec 2005 14:16:13 +0000 (14:16 +0000)]
move error handling out of line to avoid duplicated code.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoClean up 'q' debug key output.
kaf24@firebug.cl.cam.ac.uk [Sat, 31 Dec 2005 13:33:00 +0000 (14:33 +0100)]
Clean up 'q' debug key output.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAllow non-privileged domains restricted access to
kaf24@firebug.cl.cam.ac.uk [Sat, 31 Dec 2005 13:15:22 +0000 (14:15 +0100)]
Allow non-privileged domains restricted access to
I/O memory and physical interrupts, under control
of domain0. Capabilities are maintained as rangesets
in Xen.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoStore admin-specified ioport capabilities in a rangeset
kaf24@firebug.cl.cam.ac.uk [Sat, 31 Dec 2005 12:11:47 +0000 (13:11 +0100)]
Store admin-specified ioport capabilities in a rangeset
rather than a bitmap. arch_do_createdomain() can now
fail and the caller will clean up.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoEnable stack trace on Xen BUG (by Isaku Yamahata)
djm@kirby.fc.hp.com [Sat, 31 Dec 2005 05:40:13 +0000 (23:40 -0600)]
Enable stack trace on Xen BUG (by Isaku Yamahata)

20 years agoPlumb through nr_pages -- needed for correct balloon driver function
djm@kirby.fc.hp.com [Fri, 30 Dec 2005 22:11:08 +0000 (16:11 -0600)]
Plumb through nr_pages -- needed for correct balloon driver function

20 years agoMissing initialization in cache sync code (by Anthony Xu)
djm@kirby.fc.hp.com [Fri, 30 Dec 2005 18:55:19 +0000 (12:55 -0600)]
Missing initialization in cache sync code (by Anthony Xu)

20 years agoFix a missing break in ioemu command-line parsing switch
kaf24@firebug.cl.cam.ac.uk [Fri, 30 Dec 2005 16:12:40 +0000 (17:12 +0100)]
Fix a missing break in ioemu command-line parsing switch
statement.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix rdmsrl() for x86_32 -- high 32 bits must be cast to
kaf24@firebug.cl.cam.ac.uk [Fri, 30 Dec 2005 16:11:05 +0000 (17:11 +0100)]
Fix rdmsrl() for x86_32 -- high 32 bits must be cast to
u64 before shifting left.

Signed-off-by: Avi Kivity <avi@qumranet.com>
20 years agoAvoid xen crash if there is no VMX support. If a platform
kaf24@firebug.cl.cam.ac.uk [Fri, 30 Dec 2005 16:07:34 +0000 (17:07 +0100)]
Avoid xen crash if there is no VMX support. If a platform
doesn't support VMX, creating VMX domain will crash xen
HV.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoMove initial stack-pointer adjustment into assembly
kaf24@firebug.cl.cam.ac.uk [Fri, 30 Dec 2005 16:02:30 +0000 (17:02 +0100)]
Move initial stack-pointer adjustment into assembly
bootstrap code. Avoids need for indirection thru
reset_stack_and_jump() in C code (which was incorrect for
secondary CPUs since nothing was pushed on the stack on
that initial call, hence the masking operation had no
effect and we ended up running on a bogus stack pointer).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoVirtual TPM persistent states contain VTPM secrets, which are encrypted
kaf24@firebug.cl.cam.ac.uk [Fri, 30 Dec 2005 10:31:12 +0000 (11:31 +0100)]
Virtual TPM persistent states contain VTPM secrets, which are encrypted
using symmetric keys and stored on disk along with those symmetric keys.
The attached patch uses the TPM to encrypt the symmetric keys and other
global secrets before saving them to disk.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
20 years agoEnsure initrd fields are set to 0 when no initrd is present (by Kevin Tian)
djm@kirby.fc.hp.com [Thu, 29 Dec 2005 21:31:18 +0000 (15:31 -0600)]
Ensure initrd fields are set to 0 when no initrd is present (by Kevin Tian)

20 years agoLeave psr.ic on in pal_cache_flush -- fixes Linux bug (by Anthony Xu)
djm@kirby.fc.hp.com [Thu, 29 Dec 2005 21:21:39 +0000 (15:21 -0600)]
Leave psr.ic on in pal_cache_flush -- fixes Linux bug (by Anthony Xu)

20 years agoExtend the range abstraction by adding an internal
kaf24@firebug.cl.cam.ac.uk [Thu, 29 Dec 2005 17:39:50 +0000 (18:39 +0100)]
Extend the range abstraction by adding an internal
insert_range() helper function. Pretty printer uses
the internal abstractions rather than accessing the
linked list directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a little more internal abstraction to the rangeset
kaf24@firebug.cl.cam.ac.uk [Thu, 29 Dec 2005 17:16:01 +0000 (18:16 +0100)]
Add a little more internal abstraction to the rangeset
library, avoiding direct interaction with the linked-list
structure.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoReset the stack pointer on every cpu early during bootstrap.
kaf24@firebug.cl.cam.ac.uk [Thu, 29 Dec 2005 16:53:22 +0000 (17:53 +0100)]
Reset the stack pointer on every cpu early during bootstrap.
Ensures we do not overlap with the cpu_info structure.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoInitialise grant tables via core_initcall so that it happens
kaf24@firebug.cl.cam.ac.uk [Thu, 29 Dec 2005 16:37:08 +0000 (17:37 +0100)]
Initialise grant tables via core_initcall so that it happens
suitably early during the boot process.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoVarious fixes to Xen stack management. Ensure the cpu0_stack
kaf24@firebug.cl.cam.ac.uk [Thu, 29 Dec 2005 15:59:12 +0000 (16:59 +0100)]
Various fixes to Xen stack management. Ensure the cpu0_stack
is always sufficiently aligned (requires some linker script
tricks). Small fixes to show_trace() and ensure that Xen
stack pointers are always below the 'struct cpu_info' region.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd auto-destructing per-domain rangeset data structure,
kaf24@firebug.cl.cam.ac.uk [Thu, 29 Dec 2005 14:47:23 +0000 (15:47 +0100)]
Add auto-destructing per-domain rangeset data structure,
for representing sets of contiguous numeric ranges. This
will be used for representing permissions lists (e.g.,
io memory, io ports, irqs).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSync caches only on split cache machines (dynamic test instead of compile ifdef)
djm@kirby.fc.hp.com [Wed, 28 Dec 2005 21:07:30 +0000 (15:07 -0600)]
Sync caches only on split cache machines (dynamic test instead of compile ifdef)
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
20 years agoFix iobmp_mask setup when permitting a domU access to
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 15:23:42 +0000 (16:23 +0100)]
Fix iobmp_mask setup when permitting a domU access to
I/O port ranges.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
20 years agoFix a leak occurring at netif_map(). The problem raised after allocating
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 14:17:04 +0000 (15:17 +0100)]
Fix a leak occurring at netif_map(). The problem raised after allocating
both {rx,tx}_comms_area, and one (and just one) of them failed. As we
were
doing a single test for both, returning would leave one of them
allocated.

Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com>
20 years agoSet up X11 authorization when a VMX domain uses SDL.
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 14:14:23 +0000 (15:14 +0100)]
Set up X11 authorization when a VMX domain uses SDL.

Signed-off-by: Hiromichi Itou <ito@begi.net>
20 years agoReorganizes network frontend device unregister and removal, so that
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 14:07:43 +0000 (15:07 +0100)]
Reorganizes network frontend device unregister and removal, so that
occur in the right order and succeed.

Now on Closing state we:
- stop queue
- unbind irq
- unregister the device

On removal:
- end foreign access to TX and RX pages (we cannot do this before)
- free_netdev, doing the last stage of destroying an allocated device

Makes xm-test network "03_attach_detach_multiple_pos" pass:
http://xmtest.dague.org/cgi-bin/display?view=single&testid=1068

Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
20 years agoMissing file from previous changeset.
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 14:07:16 +0000 (15:07 +0100)]
Missing file from previous changeset.

20 years agoFix uncleaned vif backend devices when frontend does not finish
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 13:55:55 +0000 (14:55 +0100)]
Fix uncleaned vif backend devices when frontend does not finish
initialization properly.

Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
20 years agoIf netfront fails to allocate a receive skbuff, push all pending
kaf24@firebug.cl.cam.ac.uk [Wed, 28 Dec 2005 11:29:15 +0000 (12:29 +0100)]
If netfront fails to allocate a receive skbuff, push all pending
skbuffs out onto the shared ring. If there are no skbuffs to push,
schedule a timer to try again later. This will avoid interface
lockups in low-memory conditions.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoPrevent vbd frontend from oopsing if the underlying device doesn't exist.
vhanquez@kneesa.uk.xensource.com [Tue, 27 Dec 2005 10:40:33 +0000 (10:40 +0000)]
Prevent vbd frontend from oopsing if the underlying device doesn't exist.

Signed-off-by: Horms <horms@verge.net.au>
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoMissed portion of domU initrd patch
djm@kirby.fc.hp.com [Fri, 23 Dec 2005 21:14:21 +0000 (15:14 -0600)]
Missed portion of domU initrd patch
Signed-off-by: <takebe_akio@jp.fujitsu.com>
20 years agoGeneric x86 emulator now properly supports 16-bit addressing
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Dec 2005 17:28:33 +0000 (18:28 +0100)]
Generic x86 emulator now properly supports 16-bit addressing
by narrowing accesses to SI/DI/SP registers. Also supports
real-mode addressing by shifting and adding the appropriate
segment register for certain stack and string operations
where the effective address is not already known.

todo: Stack operations should have address size specified
by B bit in stack segment descriptor, not by default address
size or address-size override. Probably nothing depends on
the proper behaviour though.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoModify CR0 access emulation -- return physical CR0 (except
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Dec 2005 15:42:46 +0000 (16:42 +0100)]
Modify CR0 access emulation -- return physical CR0 (except
for TS) and allow only the same physical flags to be written
back to CR0 by a guest.

Add write-to-CR4 emulation, but check that the write does not
modify any CR4 flags.

Signed-off-by: Keir Fraser <keir@xensource.com>